#include <stdio.h>
void main()
{
    printf("Question:a+aa+aaa+aaaa+.....=?\n");
    int a;
    printf("please input the number you want to repeat:");
    scanf("%d",&a);
    printf("please input the digit:");
    int n;
    scanf("%d",&n);
    int i,temp=a;
    int sum=a;
    for(i=1;i<n;i++)
    {
        temp=temp*10+a;
        sum+=temp;
    }
    printf("Answer:%d",sum);
}
